package com.maila.xiaoaobusiness.fragment;

import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.maila.xiaoaobusiness.R;
import com.maila.xiaoaobusiness.activity.BusinessStatusActivity;
import com.maila.xiaoaobusiness.activity.ContactActivity;
import com.maila.xiaoaobusiness.activity.CouponsActivity;
import com.maila.xiaoaobusiness.activity.LoginActivity;
import com.maila.xiaoaobusiness.activity.PromotionActivity;
import com.maila.xiaoaobusiness.activity.QuestionActivity;
import com.maila.xiaoaobusiness.activity.ShopInofActivity;
import com.maila.xiaoaobusiness.utils.StartActivityUtils;
import com.zhy.autolayout.AutoLinearLayout;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * Created by mark on 2017/11/20.
 */

public class PersonFragment extends Fragment {
    @BindView(R.id.user_header)
    ImageView userHeader;
    @BindView(R.id.user_name)
    TextView userName;
    @BindView(R.id.ll_user_login_info)
    AutoLinearLayout llUserLoginInfo;
    @BindView(R.id.icon_shoudan)
    ImageView iconShoudan;
    @BindView(R.id.icon_manjian)
    ImageView iconManjian;
    @BindView(R.id.icon_fanquan)
    ImageView iconFanquan;
    @BindView(R.id.icon_zhekou)
    ImageView iconZhekou;
    @BindView(R.id.icon_tejia)
    ImageView iconTejia;
    @BindView(R.id.ll_sale_info)
    AutoLinearLayout llSaleInfo;
    @BindView(R.id.tv_shop_status)
    TextView tvShopStatus;
    @BindView(R.id.user_operation)
    AutoLinearLayout userOperation;
    Unbinder unbinder;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        View footview = inflater.inflate(R.layout.fragment_personal, container, false);
        unbinder = ButterKnife.bind(this, footview);
        return footview;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @OnClick({R.id.ll_user_login_info, R.id.ll_business_status, R.id.ll_shop_info, R.id.ll_coupons_manage, R.id.ll_comment_question, R.id.ll_kefu, R.id.btn_quit})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.ll_user_login_info:
                StartActivityUtils.start(getActivity(), LoginActivity.class);
                break;
            case R.id.ll_business_status:
                StartActivityUtils.start(getActivity(), BusinessStatusActivity.class);
                break;
            case R.id.ll_shop_info:
                StartActivityUtils.start(getActivity(), ShopInofActivity.class);
                break;
            case R.id.ll_coupons_manage:
                StartActivityUtils.start(getActivity(), PromotionActivity.class);
                break;
            case R.id.ll_comment_question:
                StartActivityUtils.start(getActivity(), QuestionActivity.class);
                break;
            case R.id.ll_kefu:
                StartActivityUtils.start(getActivity(),ContactActivity.class);
                break;
            case R.id.btn_quit:

                break;
        }
    }
}
